*Paper title: Issue Expansion and Selective Scrutiny - How Opposition Parties Use Parliamentary Question about the European Union in the National Arena, 1973
*Manuscript ID: ID EUP-16-1167.R1
*Author: Roman Senninger


******************************************************************************************************************************************************************************************************
set scheme blind


*Figure 1
*Top left-hand panel
use "EUP1_Senninger"

bysort year:keep if _n==_N  
graph twoway (line euissue_y year if year>=1973, lpattern(dash)), ///
ylabel(0(10)100) ytitle("Subtopic categories (count) ") xlabel(1970(5)2015) xtitle("") ///
text(80 2012 "Reform 2007", size(vsmall))  /// 
xline(2007, lcolor(black)) 


*Top right-hand panel
clear
use "EUP2_Senninger"

twoway (rcap lb ub year) /// 
scatter meaneni year, ylabel(0(5)30) xlabel(1970(5)2015) ytitle("Effective number of issues", size(small)) xtitle("year") msymbol(circle) /// 
mcolor(black)legend(position(11)ring(0) label(1 "+ / - sd")label(2 "mean")) 


*Bottom panel 
clear
use "EUP1_Senninger"

bysort meanpro meananti year:keep if _n==_N
graph twoway (lowess meanpro year if year>=1973, msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)) ///
(lowess meananti year if year>=1973, msymbol(circle) lpattern(dash_dot) lcolor(black) lwidth(medthick)) ///
(lowess  genfrac_y_ year if year>=1973, lpattern(dash) lwidth(medthick)), ///
ylabel(0(.25)1) ///
xlabel(1970(15)2015) ///
legend(position(11)ring(0) label(1 "pro European")label(2 "anti European") label(3 "overall")) ///
title("") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black))


******************************************************************************************************************************************************************************************************


* Table A2 & Figure 2 & Figure 3 
clear
ssc install coefplot, replace
use "EUP1_Senninger"


bysort year party: keep if _n==_N 
xtset party year 
xtsum genfrac_y_p eu_pos2

eststo:xtgee genfrac_y_p eu_pos2 , family(binomial) link(logit) vce(robust)  
eststo:xtgee genfrac_y_p eu_pos2 diff_ideology, family(binomial) link(logit) vce(robust)  
eststo:xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty, family(binomial) link(logit) vce(robust)  
eststo:xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty reform, family(binomial) link(logit) vce(robust)  
eststo:xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty reform ref euauthority, family(binomial) link(logit) vce(robust)  
eststo:xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty reform ref c.eu_pos2#i.reform euauthority, family(binomial) link(logit) vce(robust)
*Table A2
esttab using A2.tex, label se stats(chi2 N) replace
*Figure 2
eststo coef1: xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty reform ref euauthority, family(binomial) link(logit) vce(robust)  
coefplot (coef1) , drop(_cons) xline(0) label
*Figure 3
xtgee genfrac_y_p eu_pos2 diff_ideology absseat blocparty reform ref euauthority, family(binomial) link(logit) vce(robust)
margins , at(eu_pos2=(3 (.1) 6))
marginsplot , recast(line)  ///
ylabel(0(.2)1,format( %8.0gc))   title("")   xtitle(Euroscepticism)  ytitle(Pr(general EU))       ///
      plot1opts(lcolor(gs1)) ciopts(recast(rline) lpattern(dash))


******************************************************************************************************************************************************************************************************
 

*Table 2 
clear
use "EUP1_Senninger"
eststo clear   
bysort year: keep if _n==_N 

eststo: nbreg euissue_y stime* , irr vce(robust)
eststo: nbreg euissue_y stime* reform, irr vce(robust)   
eststo: nbreg euissue_y stime* reform eushare_y num_parties, irr vce(robust) 

esttab using TAB2.tex, eform label se stats(lnalpha ll chi2 N) replace



******************************************************************************************************************************************************************************************************


*Figure A4
clear
use "EUP2_Senninger"


bysort party year:keep if _n==_N
graph twoway (connected eni year if party==1 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Social Democrats") ytitle("Effective number of issues", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_1", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==2 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Social Liberals") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_2", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==3 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Conservatives") ytitle("", size(small))  xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_3", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==4 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Centre Democrats") ytitle("Effective number of issues", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_4", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==5 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Justice Party") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_5", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==6 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Socialist People's Party") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_6", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==7 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Communists") ytitle("Effective number of issues", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_7", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==8 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Danish People's Party") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_8", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==9 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Common Course") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_9", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==10 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Christian People's Party") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_10", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==11 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Liberals") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_11", replace) 

bysort party year:keep if _n==_N
graph twoway (connected eni year if party==12 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Unity List") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_12", replace) 


bysort party year:keep if _n==_N
graph twoway (connected eni year if party==13 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Left Socialists") ytitle("Effective number of issues", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_13", replace) 


bysort party year:keep if _n==_N
graph twoway (connected eni year if party==14 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Progress Party") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_14", replace) 


bysort party year:keep if _n==_N
graph twoway (connected eni year if party==17 & year>=1973, cmissing(n) msymbol(circle) lpattern(solid) lcolor(black) lwidth(medthick)), ///
ylabel(0(5)30) ///
xlabel(1970(15)2015) title("Liberal Alliance") ytitle("", size(small)) xtitle("year") ///
xline(2007, lcolor(black)) ///
name("ENI_17", replace) 


graph combine ENI_4 ENI_10 ENI_3 ENI_9 ENI_7 ENI_8 ENI_2 ENI_5 ENI_13 ///
ENI_17 ENI_11 ENI_14 ENI_1 ENI_6 ENI_12

******************************************************************************************************************************************************************************************************

*Figure A5
clear
use "EUP1_Senninger"

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==1, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Social Democrats") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==1 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Social Democrats") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legen(off) ///
name("FRAC_1", replace) 

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==2, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Social Liberals") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==2 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Social Liberals") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_2", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==3, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Conservatives") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==3 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Conservatives") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_3", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==4, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Centre Democrats") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==4 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Centre Democrats") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(position(11)ring(0) label(1 "No. of EU-related PQ's")label(2 "EU polity fraction")) ///
name("FRAC_4", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==5, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Justice Party") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==5 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Justice Party") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_5", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==6, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Socialist People's Party") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==6 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Socialist People's Party") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_6", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==7, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Communists") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==7 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Communists") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_7", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==8, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Danish People's Party") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==8 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Danish People's Party") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_8", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==9, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Common Course") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==9 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Common Course") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_9", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==10, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Christian People's Party") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==10 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Christian People's Party") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_10", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==11, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Liberals") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==11 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Liberals") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_11", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==12, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Unity List") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==12 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Unity List") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_12", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==13, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Left Socialists") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==13 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Left Socialists") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_13", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==14, color(gs10) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Progress Party") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==14 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Progress Party") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_14", replace)

bysort party year:keep if _n==_N
twoway bar eucount_y_p year if party==17, color(gs14) yaxis(2) ylabel(0(100)200, axis(2)) ///
xlabel(1970(15)2015) title("Liberal Alliance") ytitle("", size(small) axis(2)) xtitle("year") ///
|| lowess genfrac_y_p year if party==17 & year>=1973, cmissing(n) msymbol(circle) mcolor(black) lpattern(solid) lcolor(black) lwidth(medthick) yaxis(1) ylabel(0(.25)1, axis(1)) ///
xlabel(1970(15)2015) title("Liberal Alliance") ytitle("", size(small) axis(1)) xtitle("year") ///
xline(2007, lcolor(black)) ///
legend(off) ///
name("FRAC_17", replace)

graph combine FRAC_4 FRAC_10 FRAC_3 FRAC_9 FRAC_7 FRAC_8 FRAC_2 FRAC_5 FRAC_13 ///
FRAC_17 FRAC_11 FRAC_14 FRAC_1 FRAC_6 FRAC_12
